CREATE TABLE [dbo].[Thread]
(
[Id] [int] NOT NULL IDENTITY(1, 1),
[TypeId] [int] NOT NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[Thread] ADD CONSTRAINT [PK_Thread] PRIMARY KEY CLUSTERED  ([Id]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[Thread] ADD CONSTRAINT [FK_Thread_ThreadType] FOREIGN KEY ([TypeId]) REFERENCES [dbo].[ThreadType] ([Id])
GO
